package org.dawnframework.context.annotation;

import org.dawnframework.beans.factory.config.BeanDefinition;
import org.dawnframework.beans.factory.config.BeanDefinitionHolder;
import org.dawnframework.beans.factory.support.AbstractApplicationContext;
import org.dawnframework.beans.factory.support.DefaultableListBeanFactory;

public class GenericApplicationContext extends AbstractApplicationContext {

    private final DefaultableListBeanFactory beanFactory;

    protected GenericApplicationContext() {
        beanFactory = new DefaultableListBeanFactory();
    }

    @Override
    public void refresh() {


    }


    public DefaultableListBeanFactory getDefaultBeanFactory() {
        return beanFactory;
    }

    @Override
    public BeanDefinition getBeanDefinition(String beanName) {
        return beanFactory.getBeanDefinition(beanName);
    }

    @Override
    public void removeBeanDeinition(String beanName) {
        beanFactory.removeBeanDeinition(beanName);
    }

    @Override
    public void registerBeanDefinition(String beanName, BeanDefinition beanDefinition) {
        beanFactory.registerBeanDefinition(beanName,beanDefinition);
    }


}
